<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s"  uri="/struts-tags"%>
<%String this_path=request.getContextPath();%>
<html>
<head>
<meta name="decorator" content="none" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<s:if test='type=="do"'>
<script type="text/javascript" src="<%=this_path%>/js/common/jquery.min.js"></script>
<script type="text/javascript" src="<%=this_path%>/js/common/jquery.PrintArea.js"></script>
</s:if>
<title>借款凭证</title>
</head>
<body>

<div id="dd">
<style type="text/css">
.tableprint{border-left:1px solid #000;padding:0;margin:0;}
.tableprint tr td{padding-left:3px;font-size:12px;border-bottom:1px solid #000;border-right:1px solid #000}
.border_top{border-top:1px solid #000;}
#moneybox{padding:0;margin:0}
#moneybox table{padding:0;margin:0;text-align:center}
#moneybox table tr{height:22px;}
#moneybox table tr td{width:22px;padding:0;margin:0;border:0;}
#moneybox table .first td{border-bottom:1px solid #000;border-right:1px solid #000}
#moneybox table .second td{border-right:1px solid #000}
#moneybox table .first .lasttd{border:0;border-bottom:1px solid #000}
#moneybox table .second .lasttd{border:0;}
</style>
<table class="tableprint border_top" cellspacing="0" cellpadding="0">
  <tr style="height:2cm;" >
    <td colspan="4" align="center" >
    	<span style="font-size:16px;font-weight:bold">青岛市黄岛区瑞丰小额贷款公司</span><br />
    	<span style="font-size:16px;font-weight:bold">还款凭证</span><br />
    	收款日期：<s:text name="f.date.ymdc"><s:param value="printData.date"/></s:text>
    </td>
  </tr>
  <tr style="height:0.5cm;">
    <td style="width:2cm;" >还款人 </td>
    <td style="width:5.7cm;">${printData.name}</td>
    <td style="width:2cm;">贷款人  </td>
    <td style="width:5.7cm;text-align:center">${printData.dname}</td>
  </tr>
  <tr style="height:0.5cm;">
    <td >存款账号   </td>
    <td ></td>
    <td >贷款账号  </td>
    <td style="text-align:center">${printData.dcard}</td>
  </tr>
  <tr style="height:0.5cm;">
    <td >开户银行</td>
    <td ></td>
    <td >开户银行 </td>
    <td style="text-align:center">${printData.dbank}</td>
  </tr>
  <tr style="height:1.2cm;">
    <td>本息合计<br />(大写)</td>
    <td colspan="2" >人民币：${printData.totalmoneychinese}</td>
    <td id="moneybox">
	<table cellspacing="0" cellpadding="0">
    <tr class="first">
    	<td>千</td><td>百</td><td>十</td><td>万</td><td>千</td><td>百</td><td>十</td><td>元</td><td>角</td><td class="lasttd">分</td>
    </tr>
<tr class="second"><s:iterator value="printData.totalmoneyarray" status="index" var="var">
<td>${var }</td>
</s:iterator>
</tr>
    </table>
    </td>
  </tr>
  <tr style="height:1.6cm;">
    <td colspan="4" style="font-size:14px;line-height:1.2">
收回 <span style="text-decoration:underline">&nbsp;&nbsp;&nbsp;&nbsp;<s:text name="f.date.ymdc"><s:param value="printData.startdate"/></s:text>&nbsp;&nbsp;&nbsp;&nbsp;</span>&nbsp;发放，
      <span style="text-decoration:underline">&nbsp;&nbsp;&nbsp;&nbsp;<s:text name="f.date.ymdc"><s:param value="printData.enddate"/></s:text>&nbsp;&nbsp;&nbsp;&nbsp;</span>&nbsp;&nbsp;到期的贷款；
<br /> 
 本金：￥<s:text name="f.money"><s:param value="printData.totalmoney"/></s:text> ；利息: ￥_________________________；<br /> 
该笔贷款尚欠本金 ：￥<s:text name="f.money"><s:param value="printData.balance"/></s:text>；利息：￥_________________________；
    </td>
  </tr>
  <tr  style="height:1cm;">
    <td colspan="4"><p align="center" >上述还款项我公司已收妥。</p>
    <p align="center" >(公司财务章)</p>
    <p align="center"></p>
    <p align="center"></p></td>
  </tr>
  <tr  style="height:1.2cm;">
    <td colspan="4"></td>
  </tr>
</table>

</div>
<s:if test='type=="change"'>
<form action="creditPrint!printOutChange" >
还款金额<input type="text" />
还款日期<input type="text" />
<input type="submit" />
</form>
</s:if>
<s:elseif test='type=="sure"'>
应收账款、实收账款、未收账款、还款日期
<input type="button" class="printrealsure" value="确认" />
</s:elseif>
<s:else>
<div id="button_area"><input type="button" id="print_btn" value="确认打印" /></div> 
</s:else>
<script type="text/javascript">
$(function(){ 
    $("#print_btn").click(function(){
        $("#dd").printArea();
    }); 
});  
</script>
</body>
</html>